
#遍历
d={"dog":"狗","pig":"猪","sheep":"绵羊","goat":"山羊"}
d["cat"]="波斯猫"
#1
for x in d:#只对key循环
    print(x,"=",d[x])
#2：
print("=="*10)
for x in d.items():
    print(x[0],"=",x[1])

print("=="*10)
#3: for 拆解: unpack
for (x,y) in d.items():
    print(x,"===",y)

d.clear()
print(d)